From: Jason Andryuk Date: Thu, 29 Oct 2020 19:03:32 +0000 (-0400) Subject: libxl: Add suppress-vmdesc to QEMU machine X-Git-Tag: archive/raspbian/4.16.0+51-g0941d6cb-1+rpi1~2^2~42^2~1423 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=0a5e0ce0fb7e5a3b5dfdc936058d2c0e04e5e258;p=xen.git libxl: Add suppress-vmdesc to QEMU machine The device model state saved by QMP xen-save-devices-state doesn't include the vmdesc json. When restoring an HVM, xen-load-devices-state always triggers "Expected vmdescription section, but got 0". This is not a problem when restore comes from a file. However, when QEMU runs in a linux stubdom and comes over a console, EOF is not received. This causes a delay restoring - though it does restore. Setting suppress-vmdesc skips looking for the vmdesc during restore and avoids the wait. QEMU 5.2 enables suppress-vmdesc by default for xenfv, but this change sets it manually for xenfv and xen_platform_pci=0 when -machine pc is use. QEMU commit 9850c6047b8b "migration: Allow to suppress vmdesc submission" added suppress-vmdesc in QEMU 2.3. Signed-off-by: Jason Andryuk Acked-by: Anthony PERARD --- diff --git a/tools/libs/light/libxl_dm.c b/tools/libs/light/libxl_dm.c index d1ff35dda3..3da83259c0 100644 --- a/tools/libs/light/libxl_dm.c +++ b/tools/libs/light/libxl_dm.c @@ -1778,9 +1778,9 @@ static int libxl__build_device_model_args_new(libxl__gc *gc, /* Switching here to the machine "pc" which does not add * the xen-platform device instead of the default "xenfv" machine. */ - machinearg = libxl__strdup(gc, "pc,accel=xen"); + machinearg = libxl__strdup(gc, "pc,accel=xen,suppress-vmdesc=on"); } else { - machinearg = libxl__strdup(gc, "xenfv"); + machinearg = libxl__strdup(gc, "xenfv,suppress-vmdesc=on"); } if (b_info->u.hvm.mmio_hole_memkb) { uint64_t max_ram_below_4g = (1ULL << 32) -